package lanqiao13;

import java.util.Arrays;
import java.util.Scanner;

public class I {
	private static int n;// n种书
	private static int m;// m条记录
	private static int x;// 额外购买
	private static int[] bookNum;// ，每种书的数量
	private static int[] b;// 借书b[i]
	private static int[] l;// 第几日借书l[i]
	private static int[] r;// 第几日还书r[i]
	private static boolean[] record;// 某条记录满足则为true
	private static int res = 0;// 结果
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		m = sc.nextInt();
		x = sc.nextInt();
		bookNum = new int[n];
		for (int i = 0; i < n; i++) {
			bookNum[i] = sc.nextInt();
		}
		b = new int[m];
		l = new int[m];
		r = new int[m];
		for (int i = 0; i < m; i++) {
			b[i] = sc.nextInt();
			l[i] = sc.nextInt();
			r[i] = sc.nextInt();
		}
		record = new boolean[m];
		Arrays.fill(record, false);
		sc.close();
		
		// 对借阅记录进行排序
		for (int i = 1; i < n + 1; i++) {
			for (int j = 0; j < m; j++) {
				if (b[j] == i) {
					
				}
			}
		}
		
		int pos = 0;
		for (int i = 1; i < n + 1; i++) {
			int count = 0;
			
			for (int j = pos; j < m; j++) {
				if (j != i) {
					pos = j;
					break;
				}
				
			}
		}
	}
}
